package com.yue.config;

import com.yue.bean.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

@Configuration
@ComponentScan("com.yue")
@Import({Hc.class, MyImportSelector.class, MyImportBeanDefinitionRegistror.class})
public class MainConfig {
    /**
     * bean的注入是按照方法名字注入bean的名字
     * @return
     */
    @Bean
    public Ha ha(){
        return new Ha("sss");
    }
    @Bean
    public Hb hbb(){
        return new Hb();
    }
    @Bean
    public ColorBeanFactory colorBeanFactory(){
        return new ColorBeanFactory();
    }
}
